# 基于哪个镜像
FROM java:8
# 拷贝文件到容器，也可以直接写成ADD microservice-discovery-eureka-0.0.1-SNAPSHOT.jar /app.jar
ADD target/*.jar app.jar
RUN mkdir -p /var/logs/cloud-dubbo-client
RUN mkdir -p /var/logs/jvm
RUN mkdir -p /var/logs/dump
RUN bash -c 'touch /app.jar'
# 开放端口
EXPOSE 8012
# 配置容器启动后执行的命令
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-XX:-PrintGCDetails","-XX:-PrintGCTimeStamps","-XX:-HeapDumpOnOutOfMemoryError","-XX:HeapDumpPath=/var/logs/dump/trade_oom_dump.dump","-Xloggc:/var/logs/jvm/tenyue-trade.log","-Dfile.encoding=UTF8","-Duser.timezone=GMT+08","-XX:CMSInitiatingOccupancyFraction=90","-XX:MaxGCPauseMillis=200","-XX:StringTableSize=20000","-XX:+UseG1GC","-Xss256k","-Xmx1024m","-Xms512m","-jar","/app.jar"]
